<template>
    <div class="pad">
        <!-- table start -->
        <tableDataEl
            :page.sync="page"
            :pageSize.sync="pageSize"
            :tableData="tableData.list"
            :tableLabel="tableLabel"
            v-loading="loading"
            height="89vh"
            ImgText="支付凭证"
        />
        <!-- table end -->
    </div>
</template>

<script>
    import tableDataEl from '@/views/Setup/common/table'
    export default {
        name: "rejected",
        components: {
            tableDataEl
        },
        data () {
            return {
                page: 1,
                pageSize: 8,
                tableData: {},
                tableLabel: [
                    {
                        label: '市代名称',
                        prop: 'company'
                    },
                    {
                        label: '联系方式',
                        prop: 'phone'
                    },
                    {
                        label: '负责人',
                        prop: 'leader'
                    },
                    {
                        label: '地区',
                        prop: 'city'
                    },
                    {
                        label: '系统使用费',
                        prop: 'price'
                    },
                    {
                        label: '支付凭证',
                        prop: 'voucher',
                        image: true
                    },
                    {
                        label: '申请时间',
                        prop: 'create_time'
                    },
                    {
                        label: '驳回时间',
                        prop: 'audit_time'
                    },
                    {
                        label: '审核人',
                        prop: 'audit_person'
                    },
                    {
                        label: '驳回理由',
                        prop: 'reason'
                    }
                ],
                loading: false
            }
        },
        methods: {
            async init () {
                this.loading = true;
                let res = await this.api.log_agent_rejectList({page: this.page,pageSize: this.pageSize});
                res.code ? this.tableData = res.data : this.$message(res.msg);
                this.loading = false;
            }
        },
        mounted () {
            this.init()
        },
        watch: {
            page () {
                this.init()
            },
            pageSize () {
                this.init()
            }
        }

    }
</script>

<style scoped>
    .pad {
        padding: 10px;
    }
</style>
